﻿<html>
  <head>
    <meta name="generator" content="h-smile:richtext"/>
  </head>
<body>
  <h1>Event object</h1>
  <p>Represents user interface event. Events and corresponding event handlers are defined in <a href="Events.htm">Events</a>.</p>
  <dl>
    <h2>Constants</h2>
    <h3>Event Group codes (used with Element.subscribe() method)</h3>
    <dt>MOUSE</dt>
    <dd>mouse events group</dd>
    <dt>KEY</dt>
    <dd>key events group</dd>
    <dt>FOCUS</dt>
    <dd>focus events group</dd>
    <dt>BEHAVIOR_EVENT</dt>
    <dd>group of events generated (synthesized) by particular behaviors (like BUTTON_CLICK, EDIT_VALUE_CHANGING, etc.)</dd>
    <dt>SCROLL</dt>
    <dd>scroll events group</dd>
    <dt>SIZE</dt>
    <dd>size events group (that is just single event, onSize)</dd>
    <h3>Mouse event codes</h3>
    <dt>MOUSE_ENTER</dt>
    <dd>type of event, mouse enters the element.</dd>
    <dt>MOUSE_LEAVE</dt>
    <dd>type of event, mouse leaves the element.</dd>
    <dt>MOUSE_MOVE</dt>
    <dd>type of event, mouse moves over the element.</dd>
    <dt>MOUSE_DOWN</dt>
    <dd>type of event, mouse button pressed in the element.</dd>
    <dt>MOUSE_UP</dt>
    <dd>type of event, mouse button released in the element.</dd>
    <dt>MOUSE_DCLICK</dt>
    <dd>type of event, mouse clicked twice in the element.</dd>
    <dt>MOUSE_WHEEL</dt>
    <dd>type of event, mouse wheel rotated.</dd>
    <dt>MOUSE_TICK</dt>
    <dd>type of event, mouse timer event. Runtime sends this event regularly when mouse button is pressed on the element.</dd>
    <dt>MOUSE_IDLE</dt>
    <dd>type of event, mouse timer event. Runtime sends this event when mouse is over the element, not pressed and not moving for some time. By default this event triggers popup of tooltip.</dd>
    <dt>MOUSE_DRAG_REQUEST</dt>
    <dd>mouse pressed and moved by distance larger than some threshold. &nbsp;&lt;input|text&gt; and &lt;textarea&gt; start dragging selection while handling the event. To discard default handlers - consume the event by returning true.</dd>
    <h3>Keyboard event codes</h3>
    <dt>KEY_DOWN</dt>
    <dd>type of event, key pressed when element or one of its children is in focus.</dd>
    <dt>KEY_UP</dt>
    <dd>type of event, key released when element or one of its children is in focus.</dd>
    <dt>KEY_CHAR</dt>
    <dd>type of event, character key pressed when element or one of its children is in focus.</dd>
    <h3>Scroll event codes</h3>
    <dt>SCROLL_HOME</dt>
    <dd></dd>
    <dt>SCROLL_END</dt>
    <dd></dd>
    <dt>SCROLL_STEP_PLUS</dt>
    <dd></dd>
    <dt>SCROLL_STEP_MINUS</dt>
    <dd></dd>
    <dt>SCROLL_PAGE_PLUS</dt>
    <dd></dd>
    <dt>SCROLL_PAGE_MINUS</dt>
    <dd></dd>
    <dt>SCROLL_POS</dt>
    <dd></dd>
    <h3>Gesture (touch screen) event codes</h3>
    <dt>GESTURE_REQUEST</dt>
    <dd>The engine sends this event to request list of gestures that the element supports. Set &quot;ORed&quot; flags in Event.flags field. List of supported flags/gesture types:
      <ul>
        <li><code>Event.GESTURE_FLAG_ZOOM</code> &nbsp;- two fingers zoom;</li>
        <li><code>Event.GESTURE_FLAG_ROTATE</code> &nbsp;- two fingers rotate;</li>
        <li><code>Event.GESTURE_FLAG_PAN_VERTICAL</code> - vertical swipe or panning;</li>
        <li><code>Event.GESTURE_FLAG_PAN_HORIZONTAL</code>- horizontal swipe or panning;</li>
        <li><code>Event.GESTURE_FLAG_TAP1</code> - press-and-tap gesture;</li>
        <li><code>Event.GESTURE_FLAG_TAP2</code> - tap by two fingers;</li>
        <li><code>Event.GESTURE_FLAG_PAN_WITH_GUTTER</code> &nbsp;- &nbsp;PAN_VERTICAL and PAN_HORIZONTAL modifier - gutter.</li>
        <li><code>Event.GESTURE_FLAG_PAN_WITH_INERTIA</code> &nbsp;- &nbsp;PAN_VERTICAL and PAN_HORIZONTAL modifier - generate inertia events.</li>
        <li><code>Event.GESTURE_FLAGS_ALL</code> &nbsp;- all flags/events</li></ul></dd>
    <dt>GESTURE_ZOOM</dt>
    <dd>The zoom gesture. <code>Event.deltaV</code> &nbsp;field contains float &gt; 1.0 in case of zoom-out and float &lt; 1.0 for zoom-in.</dd>
    <dt>GESTURE_PAN</dt>
    <dd>The pan/swipe gesture. <code>Event.deltaX</code> and <code>Event.deltaY</code> fields contain integers - number of pixels in X and Y directions.</dd>
    <dt>GESTURE_ROTATE</dt>
    <dd>The rotation gesture. <code>Event.deltaV</code> &nbsp;field contains delta angle (in radians).</dd>
    <dt>GESTURE_TAP1</dt>
    <dd>The press and tap gesture.</dd>
    <dt>GESTURE_TAP2</dt>
    <dd>Tap by two fingers gesture.
      <p>Event.flags in all events (but not in GESTURE_REQUEST) is ORed combination of the following states:</p>
      <ul>
        <li><code>Event.GESTURE_STATE_BEGIN</code> - is &quot;on&quot; for first event in the gesture sequence.</li>
        <li><code>Event.GESTURE_STATE_INERTIA</code> - is &quot;on&quot; for events synthesized by the inertia processor.</li>
        <li><code>Event.GESTURE_STATE_END</code> - is &quot;on&quot; for last event in the gesture sequence.</li></ul></dd>
    <h3>Focus event codes</h3>
    <dt>LOST_FOCUS</dt>
    <dd></dd>
    <dt>GOT_FOCUS</dt>
    <dd></dd>
    <h3>Logical event codes from builtin behaviors</h3>
    <dt>BUTTON_CLICK</dt>
    <dd></dd>
    <dt>BUTTON_PRESS</dt>
    <dd></dd>
    <dt>BUTTON_STATE_CHANGED</dt>
    <dd>Checkbox/radio state was changed. ( Not all <em>BUTTON_CLICK</em>s are changing state of those. )</dd>
    <dt>EDIT_VALUE_CHANGING</dt>
    <dd></dd>
    <dt>EDIT_VALUE_CHANGED</dt>
    <dd></dd>
    <dt>SELECT_SELECTION_CHANGED</dt>
    <dd></dd>
    <dt>SELECT_STATE_CHANGED</dt>
    <dd></dd>
    <dt>HYPERLINK_CLICK</dt>
    <dd></dd>
    <dt>ACTIVATE_CHILD</dt>
    <dd></dd>
    <dt>POPUP_REQUEST</dt>
    <dd></dd>
    <dt>POPUP_READY</dt>
    <dd></dd>
    <dt>POPUP_DISMISSED</dt>
    <dd></dd>
    <dt>POPUP_DISMISSING</dt>
    <dd></dd>
    <dt>MENU_ITEM_ACTIVE</dt>
    <dd>Mouse over the menu item, Event.target is a menu item, Event.owner - initiator of the menu &nbsp;</dd>
    <dt>MENU_ITEM_CLICK</dt>
    <dd>Click on the menu item, Event.target is a menu item, Event.owner - initiator of the menu</dd>
    <dt>CONTEXT_MENU_REQUEST</dt>
    <dd>Is sent by the engine when context menu needs to be shown. <code>evt.target</code> is a top element that have got e.g. right mous click. <code>evt.source</code> [read/write] is a menu element that is about to popup. You can set your own menu element to the evt.source field while handling this event.</dd>
    <dt>CONTEXT_MENU_SETUP</dt>
    <dd>Is sent by the engine when context menu is found. <code>evt.source</code> is the menu element that you can modify at this point.</dd>
    <dt>VISUAL_STATUS_CHANGED</dt>
    <dd>Notification that the element changed its visibility either by changing <code>display</code> or <code>visibility</code> CSS attributes. The event is sent only to the element itself (so not a bubbling event).</dd>
    <dt>DISABLED_STATUS_CHANGED</dt>
    <dd>Notification that the element or one of its containers have changed its disabled status.</dd>
    <dt>TOOLTIP_REQUEST</dt>
    <dd>Request for tooltip, the event is sent in response of MOUSE_IDLE. Element on <em>evt.source</em> is a proposed tooltip element. You can assign your own DOM element to the <em>evt.source</em> field or text to <i>evt.data</i> field.&nbsp;To cancel tooltip generation set <em>evt.source</em> to <em>null</em> and return <em>true</em> (event handled) from the event handler.</dd>
    <dt>DOCUMENT_COMPLETE</dt>
    <dd>Notification that document finishes its loading - all requests for external resources are finished. <em>evt.target</em> is the root node ( <code>&lt;html&gt;</code> ) of the document that is complete. Note that the event is being generated even if some of resources were not available. DOM elements that contain non-available resources will get <code>:incomplete</code> state flag.</dd>
    <dt>FORM_SUBMIT</dt>
    <dd>behavior:form detected submission event from button type=reset. <code>evt.data</code> field contains data to be sent to the server as a map (object). You can modify the data or discard submission by returning <code>true</code> (&quot;event consumed&quot;) from the event handler.</dd>
    <dt>FORM_RESET</dt>
    <dd>behavior:form detected reset event (from button type=reset). <code>evt.data</code> field contains data to be set to input fields.</dd>
    <h3>Event flags</h3>
    <dt>SINKING</dt>
    <dd>
      <div>Event dispatching direction. If this flag set then event is being dispatched in the direction from parent to child. Example:</div>
      <pre>switch(evt.type)
{
   case Event.MOUSE_DOWN | Event.SINKING:
        // handle thr event before any child
   case Event.MOUSE_DOWN:
        // it is here as no one child processed it.
}
</pre></dd>
    <dt>HANDLED</dt>
    <dd>
      <div>Event was handled (event handler function returned <em>true</em>) by some child of the element or behavior. Example:</div>
      <pre>switch(evt.type)
{
   case Event.MOUSE_DOWN:
       // after all children and no one has handled it.
   case Event.MOUSE_DOWN | Event.HANDLED:
       // after all children, and some child has handled it.
}
</pre></dd>
    <h3>Dragging modes</h3>
    <dt>DRAGGING_MOVE<br/> DRAGGING_COPY</dt>
    <dd>Values of the <em>draggingMode</em> attribute below.</dd>
    <h3>Virtual key codes - values of keyCode filed in KEY_DOWN and KEY_UP events</h3>
    <dd>
      <pre>VK_CANCEL   VK_BACK     VK_TAB      VK_CLEAR    VK_RETURN   VK_SHIFT    VK_CONTROL
VK_MENU     VK_PAUSE    VK_CAPITAL  VK_KANA     VK_HANGUL   VK_JUNJA    VK_FINAL
VK_HANJA    VK_KANJI    VK_ESCAPE   VK_CONVERT  VK_SPACE    VK_PRIOR    VK_NEXT
VK_END      VK_HOME     VK_LEFT     VK_UP       VK_RIGHT    VK_DOWN     VK_SELECT
VK_PRINT    VK_EXECUTE  VK_SNAPSHOT VK_INSERT   VK_DELETE   VK_HELP     VK_SLEEP
VK_NUMPAD0  VK_NUMPAD1  VK_NUMPAD2  VK_NUMPAD3  VK_NUMPAD4  VK_NUMPAD5  VK_NUMPAD6
VK_NUMPAD7  VK_NUMPAD8  VK_NUMPAD9  VK_MULTIPLY VK_ADD      VK_SEPARATOR VK_SUBTRACT
VK_DECIMAL  VK_DIVIDE   VK_F1       VK_F2       VK_F3       VK_F4       VK_F5
VK_F6       VK_F7       VK_F8       VK_F9       VK_F10      VK_F11      VK_F12
VK_F13      VK_F14      VK_F15      VK_F16      VK_F17      VK_F18      VK_F19
VK_F20      VK_F21      VK_F22      VK_F23      VK_F24
</pre>
      <p>Example:</p>
      <pre>switch(event.keyCode)
{
  case Event.VK_HOME: index = 0; break;
  case Event.VK_END: index = this.length - 1; break;
}
</pre></dd>
    <h2>Properties</h2>
    <dt>type</dt>
    <dd> <font color="#999999">r - </font><em>Integer</em>, type of the event, value equal to one of the constant above.</dd>
    <dt>altKey</dt>
    <dd> <font color="#999999">r - </font><em>true/false</em>, true if ALT key is pressed. Valid for Mouse, Key events.</dd>
    <dt>ctrlKey</dt>
    <dd>r - <em>true/false</em>, true if CTRL key is pressed. Valid for Mouse, Key events.</dd>
    <dt>shiftKey</dt>
    <dd>r - <em>true/false</em>, true if SHIFT key is pressed. Valid for Mouse, Key events.</dd>
    <dt>shortcutKey</dt>
    <dd>r - <em>true/false</em>, true if either CTRL (on Windows) or COMMAND (on OSX) keys are pressed. Valid for Mouse and Key events. Use it if you want to handle keyboard shortcut commands in cross-platform manner. CTRL+C on Windows is an equivalent of COMMAND+C on OSX. Bastards, aren't they?</dd>
    <dt>commandKey</dt>
    <dd>r - <em>true/false</em>, true if either &quot;Win&quot; (on Windows keyboard) or COMMAND (on Mac keyboard) keys are pressed. Valid for Mouse and Key events.</dd>
    <dt>extendedKey</dt>
    <dd>r - <em>true/false</em>, indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard.</dd>
    <dt>mainButton</dt>
    <dd>r - <em>true/false</em>, true if main mouse button pressed (usually left mouse button). Valid for Mouse events.</dd>
    <dt>propButton</dt>
    <dd>r - <em>true/false</em>, true if property mouse button pressed (usually right mouse button). Valid for Mouse events.</dd>
    <dt>buttons</dt>
    <dd>r - <em>integer</em>, bit flags representing pressed mouse buttons, 0x01 - main (usually left) mouse button, 0x02 - right mouse button, 0x04 - middle mouse button.</dd>
    <dt>target</dt>
    <dd>r - <em>Element</em>, &nbsp;element this event tageted to.</dd>
    <dt>reason</dt>
    <dd>r/w - <em>integer</em>, reason field of control event code.</dd>
    <dt>keyCode</dt>
    <dd>r/w - integer, key scan code for KEY_DOWN/KEY_UP events and unicode codepoint of the character pressed for the KEY_CHAR event.</dd>
    <dt>group</dt>
    <dd>r - <em>symbol</em>, event group symbol, here it is a symbol of event handler function: #onMouse, #onKey, #onFocus, etc.</dd>
    <dt>wheelDelta</dt>
    <dd>r - integer, mouse wheel &quot;tick&quot; - valid in onMouse/MOUSE_WHEEL event. Either -1 or +1 depending on direction.</dd>
    <dt>scrollPos</dt>
    <dd>r - <em>integer</em>, scroll position in <em>SCROLL_POS</em> event.</dd>
    <dt>scrollAxis</dt>
    <dd>r - #vertical | #horizontal, scrollbar axis in scroll events.</dd>
    <dt>x</dt>
    <dd>r - <em>integer</em>, x coordinate of the mouse event relative to the element itself (origin of its content box)</dd>
    <dt>y</dt>
    <dd>r - <em>integer</em>, y coordinate of the mouse event relative to the element itself (origin of its content box)</dd>
    <dt>xRoot</dt>
    <dd>r - <em>integer</em>, x coordinate of the mouse event relative to the element's root element (&lt;html&gt;).</dd>
    <dt>yRoot</dt>
    <dd>r -<em>integer</em>, y coordinate of the mouse event relative to the element's root element (&lt;html&gt;).</dd>
    <dt>xView</dt>
    <dd>r - <em>integer</em>, x coordinate of the mouse event relative to the element's view (window).</dd>
    <dt>yView</dt>
    <dd>r - <em>integer</em>, y coordinate of the mouse event relative to the element's view (window).</dd>
    <dt>xScreen</dt>
    <dd>r - <em>integer</em>, x coordinate of the mouse event relative to the screen.</dd>
    <dt>yScreen</dt>
    <dd>r -<em>integer</em>, y coordinate of the mouse event relative to the screen.</dd>
    <dt>owner</dt>
    <dd>rw - Element, owner (initiator) of the menu in MENU_ITEM_CLICK, also this is value of last parameter in Element.sendEvent method.</dd>
    <dt>isOnIcon</dt>
    <dd>r - true | false, onMouse(evt) only. true if mouse is on icon area. Element icon is foreground, no-repeat image.</dd>
    <dt>dragging</dt>
    <dd>r/w - <em>Element</em>, <em>onMouse(evt)</em> and <em>onExchange(evt)</em> only. Reference of element being dragged when onMouse and data being dragged when onExchange().</dd>
    <dt>draggingMode</dt>
    <dd>r/w - <em>integer</em>, onMouse(evt) only. Dragging mode - either Event.DRAGGING_MOVE or Event.DRAGGING_COPY - current dragging mode.</dd>
    <dt>draggingDataType</dt>
    <dd>r - symbol, &nbsp;<em>onExchange(evt)</em> only. One of the following values:
      <ul>
        <li><code>#text</code> - plain text;</li>
        <li><code>#html</code> - html;</li>
        <li><code>#url</code> - hyperlink;</li>
        <li><code>#file</code> - file list;</li>
        <li><code>#json</code> - JSON data (sciter specific);</li></ul></dd>
    <dt>deltaV, deltaX, deltaY, flags</dt>
    <dd>r/o - onGesture() event specific fields. See prose above about GESTURE_**** values.</dd>
		<dt>cursor</dt>
		<dd>w/o - string, onMouse(evt) only. Set current cursor.</dd></dl>
  <h2>Methods</h2>
  <dl>
    <dt>match</dt>
    <dd>(<strong>eventName</strong>:string [,<strong>selector</strong>:string]) : true | false
      <p>Returns <em>true</em> if the event has symbolic name of <em>eventName</em> and its target matches the <em>selector</em>. The <em>eventName</em> can accept <a href="#symbolic-event-names">following symbolic names</a>:</p></dd>
    <dt>exchangeData</dt>
    <dd>() : array of symbols.
      <p>Retuns list of data items types associated with exchange oeration. The list is an array containing <code>#text</code>, <code>#html</code>, <code>#url</code>, <code>#file</code>, <code>#picture</code> or <code>#json</code>.</p></dd>
    <dt>exchangeData</dt>
    <dd>(<strong>dataType</strong>:symbol) : value
      <p>The method allows to get data of particular data type:</p>
      <p><code>#text</code> - returns string - dragged text;</p>
      <p><code>#html</code> - returns (url,html) pair - url of dragged HTML fragment and the HTML itself;</p>
      <p><code>#url</code> - returns (caption,url) pair - caption and the url itself;</p>
      <p><code>#file</code> - returns filenames array - list of dragged file paths;</p>
      <p><code>#picture</code> - returns Image object if dragged data contains an image;</p>
      <p><code>#json</code> - returns value - json value.</p>
			</dd><dt>keyPressed</dt>
		<dd>(<b>vkKeyCode</b>: integer) : true | false<p>Class (static) function, reports true if key is pressed. Can be used to check state of for example CAPSLOCK or&nbsp;NUMLOCK keys :&nbsp;</p>
			
			<pre>if( Event.keyPressed(Event.VK_CAPITAL) ) 
  ... CAPSLOCK is pressed ... </pre></dd></dl>
  <h2 id="symbolic-event-names">Symbolic event names</h2>
  <p>Symbolic event names are used by <code>Element.subscribe(&quot;name&quot;, ...)</code>, <code>Element.on(&quot;name&quot;, ...)</code>, <code>Event.match(&quot;name&quot;, ...)</code> and <code>event <i>name</i>&nbsp;() {}</code> script functions.</p>
  <dl>
    <dt>click</dt>
    <dd>- button and hyperlink clicks;</dd>
    <dt>dblclick</dt>
    <dd>- mouse double click;</dd>
		<dt>tripleclick</dt>
		<dd>- mouse triple click;</dd>
    <dt>change</dt>
    <dd>- value has been changed by the user;</dd>
		<dt>changing</dt>
		<dd>- value of <code>&lt;input&gt;</code> is about to change, the event gets sent before actual changes applied.</dd>
    <dt>submit</dt>
    <dd>- form submit event fired before data of the form is submited;</dd>
    <dt>reset</dt>
    <dd>- form reset event fired before data of the form gets reset;</dd>
    <dt>expand</dt>
    <dd>- event generated by various behaviors when event.target item gets expanded / shown (e.g. in tree view widget);</dd>
    <dt>collapse</dt>
    <dd>- event generated by various behaviors when event.target item gets collapsed / hidden (e.g. in tree view widget);</dd>
    <dt>statechange</dt>
    <dd>- UI state change, for example behavior:textarea and behavior:richtext send this event when caret or selection position changes;</dd>
		<dt>visualstatechange</dt>
		<dd>- visibility or display change causes element to become visible/invisible; </dd>
		<dt>disabledstatechange</dt>
		<dd>- state.disabled change on element;</dd>
		<dt>readonlystatechange</dt>
		<dd>- state.readonly change on element;</dd>
    <dt>contextmenu</dt>
    <dd>- context menu request (right button or property key click);</dd>
    <dt>animationstart</dt>
    <dd>- animation life cycle event - notifies about start of animation;</dd>
    <dt>animationend</dt>
    <dd>- animation life cycle event - notifies about end of any animation on the element;</dd>
    <dt>mediachange</dt>
    <dd>- Event.MEDIA_CHANGED, the mediachange event is received when runtime detects display settings/parameters change. Received only by root document inside the view.</dd>
    <dt>contentchange</dt>
    <dd>- Event.CONTENT_CHANGED, &nbsp;received by the element when its content gets changed - DOM elements added or removed. &nbsp;</dd>
    <dt>inputlangchange</dt>
    <dd>- Event.INPUT_LANGUAGE_CHANGED, &nbsp;received by the focus element when the user changes input language. &nbsp;event.data is a string - ISO lang-country code.</dd>
    
		<h4>Mouse events</h4><dt>mousedown</dt>
    <dd>- Event.MOUSE_DOWN event;</dd>
    <dt>mouseup</dt>
    <dd>- Event.MOUSE_UP event;</dd>
    <dt>mousemove</dt>
    <dd>- Event.MOUSE_MOVE event;</dd>
    <dt>mouseenter</dt>
    <dd>- Event.MOUSE_ENTER event, mouse entered the element.</dd>
    <dt>mouseleave</dt>
    <dd>- Event.MOUSE_LEAVE event, mouse left the element.</dd>
    <dt>mousedragrequest</dt>
    <dd>- Event.MOUSE_DRAG_REQUEST event, drag condition (mouse pressed and moved) is detected.</dd>
    
		<h4>Focus events</h4><dt>focusin</dt>
    <dd>- Event.FOCUS_IN, the focusin event is sent to an element when it, or any element inside of it, gains focus. If focus stays inside some container then the container will not receive the event.</dd>
    <dt>focusout</dt>
    <dd>- Event.FOCUS_OUT, the focusin event is sent to an element when it, or any element inside of it, loses focus. If focus stays inside some container then the container will not receive the event.</dd>
    <dt>focus</dt>
    <dd>- Event.GOT_FOCUS, the focus event is sent to an element when it gains focus. Event.target is the element that got focus.</dd>
    <dt>blur</dt>
    <dd>- Event.LOST_FOCUS, the focus event is sent to an element when it loses focus. Event.target is the element that lost focus.</dd>
    
		<h4>Keyboard events</h4><dt>keydown</dt>
    <dd>- Event.KEY_DOWN, the keydown event is fired when a key is pressed down. Event.keyCode is virtual key code - one of Event.VK_**** values.</dd>
    <dt>keyup</dt>
    <dd>- Event.KEY_UP, the keyup event is fired when a key is released. Event.keyCode is virtual key code - one of Event.VK_**** values.</dd>
    <dt>keypress</dt>
    <dd>- Event.KEY_CHAR, the keypress event is fired when the element receives character value. Event.keyCode is a UNICODE code point of the character.</dd>
    
		<h4>Scroll event</h4><dt>scroll</dt>
    <dd>- scroll event;</dd>
		<h4>Popup and tooltip events</h4>
    <dt>popuprequest</dt>
    <dd>- Event.POPUP_REQUEST, the event is fired as a first phase of popup creation, when window for it is not created. event.source is the popup element. Use this event to popuplate content of the popup.</dd>
    <dt>popupready</dt>
    <dd>- Event.POPUP_READY, the event is fired as a last phase of popup creation, when window for it is created. event.source is the popup element.</dd>
    
		
		<dt>popupdismissing</dt><dd>-&nbsp;Event.POPUP_DISMISSING,&nbsp;the event is sent&nbsp;<b>before</b> popup window gets removed from screen. The event is sent to the element itself while popup is still visible (but about to be closed).</dd><dt>popupdismissed</dt>
    <dd>- Event.POPUP_DISMISSED, the event is posted to the popup owner and <b>after</b> popup window gets removed from screen.</dd>
		<dt>tooltiprequest</dt>
		<dd>- Event.TOOLTIP_REQUEST, the event is sent in response to Event.MOUSE_IDLE.</dd>
		
		<h4>Element lifecycle events</h4><dt>detached</dt>
		<dd>- not a bubbling event - is sent to the element itself only before it gets removed from the DOM.</dd>
    
		<h4>Document lifecycle events</h4><dt>close</dt>
    <dd>- Event.DOCUMENT_CLOSE, the event is fired as when document gets removed from its container (view or frame). Only document elements and its containers receive this event.</dd>
    <dt>closerequest</dt>
    <dd>- Event.DOCUMENT_CLOSE_REQUEST, the event is fired to request document removal from its container (view or frame). Only document elements and its containers receive this event. By handling this request application can discard window or document closing by setting <code>event.cancel = true;</code> &nbsp;in event handler.</dd>
    <dt>ready</dt>
    <dd>- Event.DOCUMENT_READY, the event is fired as when document gets parsed in full and its DOM is established. Only document elements and its containers receive this event.</dd>
    <dt>complete</dt>
    <dd>- Event.DOCUMENT_COMPLETE, the event is fired as when document have downloaded all resources (images, styles, scripts) it requested . Only document elements and its containers receive this event.</dd>
		<h4>Command execution events</h4>
    <dt>query:{command}</dt>
    <dd>- the event is fired to query readiness to execute the {command}. E.g. &quot;query:edit:paste&quot; event gets sent to check if the element is able to paste content from clipboard at the moment. The element can set event.result field to report availability of the command. Command can have additional command parameters in event.data field.</dd>
    <dt>exec:{command}</dt>
    <dd>- the event is fired to execute the {command}. E.g. &quot;query:edit:paste&quot; event is sent to the element to execute paste from clipboard.</dd>
		
		<h4>System drag and drop events</h4>
		<dt>dragaccept</dt>
		<dd>- fired before any other <code>drag***</code> events, a.k.a. <code>Event.X_WILL_ACCEPT_DROP</code> . &quot;Will the element accept the <code>event.dragging</code> data?&quot;. The element shall return <code>true</code> from the handler in order to receive all other drag/drop events.</dd><dt>drag</dt>
		<dd>- fired when a data is being dragged over the element.&nbsp;</dd>
		<dt>dragenter</dt>
		<dd>-&nbsp;fired when data drag enters the element.</dd>
		<dt>dragleave</dt>
		<dd>-&nbsp;fired when data drag leaves the element.</dd>
		<dt>drop</dt>
		<dd>- fired when data is dropped onto the target element.</dd></dl>
  <p>Any other string is considered as custom event, to post/send such events use <code>Element.postEvent</code>/<code>sendEvent(name,...)</code> &nbsp;methods.</p>
</body>
</html>